/*
 * graphtest.c
 *
 *  Created on: Mar 22, 2011
 *      Author: nish
 */
#include "fdm1dutils.h"

main(){
	int x=0,y=0,z=0;
	int xmax=3,ymax=3,zmax=3;

	float i,j,k;
	printf("opening the graph file\n");
	FILE* fp = fopen("graph.dat","w");
	float f =0;
	printf("generating data\n");
	for(i=1;i<xmax;i++){
		for(j=1;j<ymax;j++){
			for(k=1;k<zmax;k++){
				f=(i*i+j*j+k*k);
				if(f==16){
					fprintf(fp,"%f\t",f);
				}else{
					fprintf(fp,"0\t");
				}
			}
		}
		fprintf(fp,"\n");
	}

	fclose(fp);
	printf("exiting\n");
}
